<?php
namespace app\common\model\newmodel;

use think\Model;

class DeviceAccessory extends Model
{
    protected $table = 'device_accessory';
    protected $pk = 'id';

    public static function deleteAllDeviceAccessory($device_id)
    {
        if(empty($device_id)){
            return ['code' => false, 'msg'=> '参数不完整'];
        }
        self::where('device_id',$device_id)->delete();
        return ['code'=> true ,'msg' => '设备配件删除成功'];
    }
}